package com.handpay.nocardpay.baselibrary.pay.uniopayquick.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 银联快捷支付请求类
 */
public class UnionQuickPayReqBean implements Parcelable {
    /**
     * 操作类型
     * 1支付
     * 2开通并支付
     */
    private int operateType;

    private String cardNo;

    private String historyCardNo;

    private String cardID;

    private String merchantCode;

    private String merchClassId;

    private String amount;

    private String channel;

    private String address;

    private String location;

    private String clientChannel;

    private String clientVersion;

    /**
     * 开通并支付下面三个字段需要使用
     */

    private String expireDate;

    private String cvn2No;

    private String mobile;
    /**
     * 银行卡号  true 历史卡 false  手动输入
     */
    private boolean isHistroyBankNo = false;
    /**
     * 支付方式
     */
    private int tradeType;

    public int getOperateType() {
        return operateType;
    }

    public void setOperateType(int operateType) {
        this.operateType = operateType;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getCardID() {
        return cardID;
    }

    public void setCardID(String cardID) {
        this.cardID = cardID;
    }

    public String getMerchantCode() {
        return merchantCode;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getMerchClassId() {
        return merchClassId;
    }

    public void setMerchClassId(String merchClassId) {
        this.merchClassId = merchClassId;
    }

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getClientChannel() {
        return clientChannel;
    }

    public void setClientChannel(String clientChannel) {
        this.clientChannel = clientChannel;
    }

    public String getClientVersion() {
        return clientVersion;
    }

    public void setClientVersion(String clientVersion) {
        this.clientVersion = clientVersion;
    }

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    public String getCvn2No() {
        return cvn2No;
    }

    public void setCvn2No(String cvn2No) {
        this.cvn2No = cvn2No;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public boolean isHistroyBankNo() {
        return isHistroyBankNo;
    }

    public void setHistroyBankNo(boolean histroyBankNo) {
        isHistroyBankNo = histroyBankNo;
    }

    public String getHistoryCardNo() {
        return historyCardNo;
    }

    public void setHistoryCardNo(String historyCardNo) {
        this.historyCardNo = historyCardNo;
    }

    public int getTradeType() {
        return tradeType;
    }

    public void setTradeType(int tradeType) {
        this.tradeType = tradeType;
    }

    public UnionQuickPayReqBean() {
    }

    @Override
    public String toString() {
        return "UnionQuickPayReqBean{" +
                "operateType=" + operateType +
                ", cardNo='" + cardNo + '\'' +
                ", historyCardNo='" + historyCardNo + '\'' +
                ", cardID='" + cardID + '\'' +
                ", merchantCode='" + merchantCode + '\'' +
                ", merchClassId='" + merchClassId + '\'' +
                ", amount='" + amount + '\'' +
                ", channel='" + channel + '\'' +
                ", address='" + address + '\'' +
                ", location='" + location + '\'' +
                ", clientChannel='" + clientChannel + '\'' +
                ", clientVersion='" + clientVersion + '\'' +
                ", expireDate='" + expireDate + '\'' +
                ", cvn2No='" + cvn2No + '\'' +
                ", mobile='" + mobile + '\'' +
                ", isHistroyBankNo=" + isHistroyBankNo +
                ", tradeType=" + tradeType +
                '}';
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.operateType);
        dest.writeString(this.cardNo);
        dest.writeString(this.historyCardNo);
        dest.writeString(this.cardID);
        dest.writeString(this.merchantCode);
        dest.writeString(this.merchClassId);
        dest.writeString(this.amount);
        dest.writeString(this.channel);
        dest.writeString(this.address);
        dest.writeString(this.location);
        dest.writeString(this.clientChannel);
        dest.writeString(this.clientVersion);
        dest.writeString(this.expireDate);
        dest.writeString(this.cvn2No);
        dest.writeString(this.mobile);
        dest.writeByte(this.isHistroyBankNo ? (byte) 1 : (byte) 0);
        dest.writeInt(this.tradeType);
    }

    protected UnionQuickPayReqBean(Parcel in) {
        this.operateType = in.readInt();
        this.cardNo = in.readString();
        this.historyCardNo = in.readString();
        this.cardID = in.readString();
        this.merchantCode = in.readString();
        this.merchClassId = in.readString();
        this.amount = in.readString();
        this.channel = in.readString();
        this.address = in.readString();
        this.location = in.readString();
        this.clientChannel = in.readString();
        this.clientVersion = in.readString();
        this.expireDate = in.readString();
        this.cvn2No = in.readString();
        this.mobile = in.readString();
        this.isHistroyBankNo = in.readByte() != 0;
        this.tradeType = in.readInt();
    }

    public static final Creator<UnionQuickPayReqBean> CREATOR = new Creator<UnionQuickPayReqBean>() {
        @Override
        public UnionQuickPayReqBean createFromParcel(Parcel source) {
            return new UnionQuickPayReqBean(source);
        }

        @Override
        public UnionQuickPayReqBean[] newArray(int size) {
            return new UnionQuickPayReqBean[size];
        }
    };
}
